package com.syh.bscommon.Util;


import com.syh.bscommon.pojo.UserInfo;

public class UserHolder {
    private static final ThreadLocal<UserInfo> tl = new ThreadLocal<>();

    public static void saveUser(UserInfo user){
        tl.set(user);
    }

    public static UserInfo getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
